Telerik Forums
UI for WPF Forum
2 answers
29 views

Hi,

Can I check if it is possible to disable having multiple radpanes in a radpanegroup - only 1 radpane in 1 radpanegroup? As I understand that I have to use radpanegroup in order to use radpane

Lim
Top achievements
Rank 1
Iron
 answered on 13 Feb 2025
1 answer
95 views
I have a `RadPanelBar` bound to an `ItemsSource`.    I have it set to `SelectionMode` single.  And my view-model ensures that there is always a a selected item. 

But how do I force the Panel Bar to make the selected item always be expanded.   I do not want to allow the user to be allowed to ever collapse it. Is it a property I can set in the ItemContainerStyle? Something else?

At one point I tried binding the RadPanelBarItem.IsExpanded property to its `IsSelected` property.  But that didn't work.



<tk:RadPanelBar x:Name="PanelBar" BorderThickness="0"  
        Padding="0 3 0 0" 
        tk:AnimationManager.IsAnimationEnabled="True"
        SelectedItem="{Binding CurrentAnalysisCategory, Mode=TwoWay}"
        ItemsSource="{Binding AnalysisCategories}"
        VerticalContentAlignment="Stretch"
        VerticalAlignment="Stretch">


 <tk:RadPanelBar.Resources>
 <DataTemplate DataType="{x:Type avm:RoutinesVm}">
 <views:RoutinesPanel />
 </DataTemplate>
 <DataTemplate DataType="{x:Type avm:MeasurementsVm}">
 <views:MeasurementsPanel/>
 </DataTemplate>
<DataTemplate x:Key="ViewTemplate">
<ContentPresenter Content="{Binding}" />
 </DataTemplate>
 </tk:RadPanelBar.Resources>

 <tk:RadPanelBar.ItemTemplate>

<HierarchicalDataTemplate 
                ItemsSource="{Binding Data}"
				    ItemTemplate="{StaticResource ViewTemplate}">
			 <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" VerticalAlignment="Center" />
</HierarchicalDataTemplate>


 </tk:RadPanelBar.ItemTemplate>

 <tk:RadPanelBar.ItemContainerStyle>
 <Style TargetType="{x:Type tk:RadPanelBarItem}">
                <Setter Property="Padding"                  Value="3"/>
                <Setter Property="VerticalAlignment"        Value="Stretch"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                <Setter Property="MinHeight"                Value="0"/>
                <Setter Property="BorderThickness"          Value="0"/>
                <Setter Property="MaxHeight"                Value="{Binding ElementName='Root', Path=MaxItemHeight}"/>
                <Setter Property="MaxWidth"                 Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type views:ScanImagePanel}}, Path=ActualWidth}"/>
                <Setter Property="tk:AnimationManager.AnimationSelector" Value="{StaticResource FastAnimator}"/>

            </Style>
 </tk:RadPanelBar.ItemContainerStyle>


 </tk:RadPanelBar>




Dimitar
Telerik team
 answered on 26 Jan 2024
9 answers
452 views
I am facing issue in removing the highlighting effect(yellow color on mouse hover) of RadPaneBar in wpf application.
How to remove mouse hover effect from RadPanebar or any specific styles to be applied to remove highlighting.
Let me know.
Masha
Telerik team
 answered on 20 Sep 2023
1 answer
88 views

Hi,

I have the RadPanelBar in figure:

I would like to draw a border around all the items inside a RadPanelBarItem. If I set border in RadPanelBarItem I get the effect as in figure: only the header is bordered while the inside items are not.
My purpose id to hilight the item not the header, is there any way to achieve this?

Thank you

Luigi

Dinko
Telerik team
 answered on 14 Jul 2023
1 answer
97 views

I cannot see any documentation or examples of how to scroll into a view items in a RadPanelBar. Are you able to provide an example of how to do this?

I've found a way to auto expand an item using <Setter Property="IsExpanded" Value="{Binding IsExpanded}" /> but this can expand an item which is still not visible and needs to be manually scrolled to. The IsSelected is similar but just seems to highlight that item and not scroll into view.

How can I auto scroll an item in the RadPanelBar into view using MVVM? Typically there may be approx 200 items but only 10 can be seen in view at any one time.

Code:


<telerik:RadPanelBar x:Name="radPanelBar1" Grid.Row="1" Width="500"
           HorizontalAlignment="Left" VerticalAlignment="Top"
           ItemTemplate="{StaticResource PanelBarHeaderTemplate}"
           ItemsSource="{Binding PanelBar1Items}"
           ExpandMode="Multiple">
      <telerik:RadPanelBar.ItemContainerStyle>
          <Style TargetType="telerik:RadPanelBarItem" BasedOn="{StaticResource RadPanelBarItemStyle}">
              <Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
          </Style>
      </telerik:RadPanelBar.ItemContainerStyle>
</telerik:RadPanelBar>

 

Martin Ivanov
Telerik team
 answered on 12 Jan 2023
1 answer
253 views

I have a panelbaritem that contains a grid. When the grid is expanded I get the scrollbar as expected. I am able to scroll up/down by dragging the scrollbar button up/down. However, I cannot use the mousewheel to scroll.

Is there any special setting to enable mouse wheel scrolling.

Just to make sure that it is not a problem with my project, I created a small test project and see the same behavior.

Stenly
Telerik team
 answered on 18 May 2022
1 answer
95 views

I would like my PanelBarItem to not change the background color while I move my move over it.

This is what is happening and not desired

This is what is desired

Is there an easy and simple way to accomplish this?

Note: I am okay with the Header area changing color while the mouse is over that area. (area containing text A,B,C.).

I would like to avoid extracting and changing the entire template just for this one small change.

Thanks in advance.

Stenly
Telerik team
 answered on 09 May 2022
1 answer
181 views

Hello,

I have a need to customize the header part of the RadPanelBarItems, by adding a checkbox (see below). When I make this change, the text color used for that particular RadPanelBarItem (in this case "Five") is not the same as the defaults (during mouse over or selection).

How can I get the default behavior of the Black color font when selected (or mouse over) on my customized RadPanelBarItem. The only thing I need to do is add a checkbox to the header as shown.

In the picture below items "One", "Two", "Three" and "Four" use default behavior. "Five" has the customized header.

Thanks in advance

Mouse over or selected "Five". Notice the "White" font does not change to Black.

Mouse over or selected "Two". Notice that the font changes to "Black" - desired behavior

 

   <telerik:RadPanelBar>
            <telerik:RadPanelBarItem Header="One">
            </telerik:RadPanelBarItem>
            <telerik:RadPanelBarItem Header="Two">
            </telerik:RadPanelBarItem>
            <telerik:RadPanelBarItem Header="Three" />
            <telerik:RadPanelBarItem Header="Four" />

            <telerik:RadPanelBarItem>
                <telerik:RadPanelBarItem.Header>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="Five" />
                        <CheckBox Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                </telerik:RadPanelBarItem.Header>
            </telerik:RadPanelBarItem>
        </telerik:RadPanelBar>
Dilyan Traykov
Telerik team
 answered on 11 Apr 2022
1 answer
206 views

Hi, I have the following code and I want to have an animation to enable and disable any "radpane "in the related "radpanegroup".

For example, when I put a "radpane" in pin mode, its width increases by 3 seconds, or another example is that the border color changes.
My solution is to use: 

<telerik:RadDocking>

        ...

...

...

<telerik:RadDocking.FlyoutBehavior>
                <local:AnimatedFlyoutBehavior/>
            </telerik:RadDocking.FlyoutBehavior>

</telerik:RadDocking>

 

I used the IFlyoutBehavior interface and as a result the following functions were implemented:

  void IFlyoutBehavior.OnMouseEnter (IFlyoutHost host, RadPane targetPane)
        {

        }

        void IFlyoutBehavior.OnPaneActivated (IFlyoutHost host, RadPane targetPane)
{
        }

        void IFlyoutBehavior.OnMouseLeave (IFlyoutHost host)
        {

        }

        void IFlyoutBehavior.OnOpeningTimerTimeout (IFlyoutHost host)
        {


        }

        void IFlyoutBehavior.OnClosingTimerTimeout (IFlyoutHost host)
        {

        }

        void IFlyoutBehavior.OnPaneDeactivated (IFlyoutHost host, RadPane targetPane)
        {
            var selectedPane = host.SelectedPane;

            if (selectedPane! = null &&! selectedPane.IsActive && host.CurrentState == FlyoutState.Opened)
            {
                host.StartCloseAnimation ();
            }
        }

        void IFlyoutBehavior.OnPaneMouseLeftButtonDown (IFlyoutHost host, RadPane targetPane)
        {
            if (host.CurrentState! = FlyoutState.Opened)
            {
                host.StartOpenAnimation ();
            }
            else
            {
                host.StartCloseAnimation ();

            }
        }

    }

I could not use enough of this interface. Is there a better way to customize animation in radpane or to develop it that way?

 

 

                     
Dilyan Traykov
Telerik team
 answered on 15 Dec 2021
3 answers
205 views
            <telerikNavigation:RadPanelBar Orientation="Horizontal" Height="100"  HorizontalAlignment="Stretch">
                <telerikNavigation:RadPanelBarItem Header="Photo" >
                </telerikNavigation:RadPanelBarItem>
                <telerikNavigation:RadPanelBarItem Header="Page">
                    <ctrl:ctrl />
                </telerikNavigation:RadPanelBarItem>
                <telerikNavigation:RadPanelBarItem Header="Cover>
                    <ctrl:ctrl />
                </telerikNavigation:RadPanelBarItem>
            </telerikNavigation:RadPanelBar>

From the code above, if the content inside the "Page" RadPanelBarItem is too long, the scrollbar will appear.
But this scrollbar appear in RadPanelBar but not that particular PanelBarItem itself.
And if you can want to click "Cover" RadPanelBarITem, you got to scroll to the end of the RadPanelBar to see it.

So, is there anyway to make the scrollbar appear inside the RadPanelBarItem itself but not in RadPanelBar.
Besides, the scrollbar located at top, it block the appearance of Header in RadPanelBarItem.
Can make it locate at bottom instead? More make sense.
Vladimir Stoyanov
Telerik team
 answered on 15 Jun 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?